import axios from "@/http/http.js";

// 封装用户注册接口
export const registerAPI = (data) => {
    return axios({
        url: '/user/register',
        method: 'post',
        data,
        headers: { "content-type": "application/x-www-form-urlencoded" }
    })
};

// 封装用户信息修改接口
export const userInfoUpdateAPI = (data) => {
    return axios({
        url: '/user/update',
        method: 'put',
        data
    })
};

// 封装用户信息修改接口
export const updatePasswordAPI = (data) => {
    return axios({
        url: '/user/updatePassword',
        method: 'put',
        data,
        headers: { "content-type": "application/x-www-form-urlencoded" }
    })
};

// 封装用户登录接口
export const LoginAPI = (data) => {
    return axios({
        url: '/user/login',
        method: 'post',
        data,
        headers: { "content-type": "application/x-www-form-urlencoded" }
    })
};